<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilocp: XilOcp Client APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilocp
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xocp__client__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">XilOcp Client APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa164a8fafefc1e2b183db27281ee1b13"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#gaa164a8fafefc1e2b183db27281ee1b13">XOcp_ClientInit</a> (XOcp_ClientInstance *const InstancePtr, XMailbox *const MailboxPtr)</td></tr>
<tr class="memdesc:gaa164a8fafefc1e2b183db27281ee1b13"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the instance of mailbox.  <a href="#gaa164a8fafefc1e2b183db27281ee1b13">More...</a><br/></td></tr>
<tr class="separator:gaa164a8fafefc1e2b183db27281ee1b13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe2000beca7269b9e9f1ba0434adfbb7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#gabe2000beca7269b9e9f1ba0434adfbb7">XOcp_ExtendHwPcr</a> (XOcp_ClientInstance *InstancePtr, <a class="el" href="group__xil__ocpapis.html#ga6d4b0b867435b21d30213387044b633c">XOcp_HwPcr</a> PcrNum, u64 ExtHashAddr, u32 Size)</td></tr>
<tr class="memdesc:gabe2000beca7269b9e9f1ba0434adfbb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to extend the PCR with provided hash by requesting ROM service.  <a href="#gabe2000beca7269b9e9f1ba0434adfbb7">More...</a><br/></td></tr>
<tr class="separator:gabe2000beca7269b9e9f1ba0434adfbb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga729ea6a53f3410b330a4eb6635074c88"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga729ea6a53f3410b330a4eb6635074c88">XOcp_GetHwPcr</a> (XOcp_ClientInstance *InstancePtr, u32 PcrMask, u64 PcrBufAddr, u32 PcrBufSize)</td></tr>
<tr class="memdesc:ga729ea6a53f3410b330a4eb6635074c88"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get the PCR value from requested PCR.  <a href="#ga729ea6a53f3410b330a4eb6635074c88">More...</a><br/></td></tr>
<tr class="separator:ga729ea6a53f3410b330a4eb6635074c88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36f63a2e8165e1f3360f8e2858d7aa53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga36f63a2e8165e1f3360f8e2858d7aa53">XOcp_GetHwPcrLog</a> (XOcp_ClientInstance *InstancePtr, u64 HwPcrEventAddr, u64 HwPcrLogInfoAddr, u32 NumOfLogEntries)</td></tr>
<tr class="memdesc:ga36f63a2e8165e1f3360f8e2858d7aa53"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get the log and status of HWPCR.  <a href="#ga36f63a2e8165e1f3360f8e2858d7aa53">More...</a><br/></td></tr>
<tr class="separator:ga36f63a2e8165e1f3360f8e2858d7aa53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaebd4df862308eaeebbfb06a456a19f9f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#gaebd4df862308eaeebbfb06a456a19f9f">XOcp_GenDmeResp</a> (XOcp_ClientInstance *InstancePtr, u64 NonceAddr, u64 DmeStructResAddr)</td></tr>
<tr class="memdesc:gaebd4df862308eaeebbfb06a456a19f9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to fill the DME structure and generates the response with signature.  <a href="#gaebd4df862308eaeebbfb06a456a19f9f">More...</a><br/></td></tr>
<tr class="separator:gaebd4df862308eaeebbfb06a456a19f9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga16013e82a245e7dfdd7a3c2e2df476e5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga16013e82a245e7dfdd7a3c2e2df476e5">XOcp_GetX509Cert</a> (XOcp_ClientInstance *InstancePtr, u64 GetX509CertAddr)</td></tr>
<tr class="memdesc:ga16013e82a245e7dfdd7a3c2e2df476e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get 509 certificate.  <a href="#ga16013e82a245e7dfdd7a3c2e2df476e5">More...</a><br/></td></tr>
<tr class="separator:ga16013e82a245e7dfdd7a3c2e2df476e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0c6bb44603339209f55de3ef94141395"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga0c6bb44603339209f55de3ef94141395">XOcp_ClientAttestWithDevAk</a> (XOcp_ClientInstance *InstancePtr, u64 AttestWithDevAk)</td></tr>
<tr class="memdesc:ga0c6bb44603339209f55de3ef94141395"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get 509 certificate.  <a href="#ga0c6bb44603339209f55de3ef94141395">More...</a><br/></td></tr>
<tr class="separator:ga0c6bb44603339209f55de3ef94141395"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8fbe7fbfcb136e816374b295b769972"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#gab8fbe7fbfcb136e816374b295b769972">XOcp_ExtendSwPcr</a> (XOcp_ClientInstance *InstancePtr, XOcp_SwPcrExtendParams *ExtendParams)</td></tr>
<tr class="memdesc:gab8fbe7fbfcb136e816374b295b769972"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to extend the SW PCR with provided hash/data.  <a href="#gab8fbe7fbfcb136e816374b295b769972">More...</a><br/></td></tr>
<tr class="separator:gab8fbe7fbfcb136e816374b295b769972"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaca4f4567e961877901f3ed298ed01e9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#gaaca4f4567e961877901f3ed298ed01e9">XOcp_GetSwPcr</a> (XOcp_ClientInstance *InstancePtr, u32 PcrMask, u8 *PcrBuf, u32 PcrBufSize)</td></tr>
<tr class="memdesc:gaaca4f4567e961877901f3ed298ed01e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get the SW PCR value from requested PCR.  <a href="#gaaca4f4567e961877901f3ed298ed01e9">More...</a><br/></td></tr>
<tr class="separator:gaaca4f4567e961877901f3ed298ed01e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga71a4d8aea262fc732fa812829dd891ae"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga71a4d8aea262fc732fa812829dd891ae">XOcp_GetSwPcrLog</a> (XOcp_ClientInstance *InstancePtr, XOcp_SwPcrLogReadData *LogParams)</td></tr>
<tr class="memdesc:ga71a4d8aea262fc732fa812829dd891ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get the SW PCR log.  <a href="#ga71a4d8aea262fc732fa812829dd891ae">More...</a><br/></td></tr>
<tr class="separator:ga71a4d8aea262fc732fa812829dd891ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa9d5159f23ac4215dff07b1a16a0e2e9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#gaa9d5159f23ac4215dff07b1a16a0e2e9">XOcp_GetSwPcrData</a> (XOcp_ClientInstance *InstancePtr, XOcp_SwPcrReadData *DataParams)</td></tr>
<tr class="memdesc:gaa9d5159f23ac4215dff07b1a16a0e2e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to get the SW PCR data for the specified PCR.  <a href="#gaa9d5159f23ac4215dff07b1a16a0e2e9">More...</a><br/></td></tr>
<tr class="separator:gaa9d5159f23ac4215dff07b1a16a0e2e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50bd2fa853d6aba7c12fec38bb3867ae"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga50bd2fa853d6aba7c12fec38bb3867ae">XOcp_GenSharedSecretWithDevAk</a> (XOcp_ClientInstance *InstancePtr, const u8 *PubKey, u8 *SharedSecret)</td></tr>
<tr class="memdesc:ga50bd2fa853d6aba7c12fec38bb3867ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to generate shared secret using Elliptic Curve Diffie–Hellman Key Exchange (ECDH).  <a href="#ga50bd2fa853d6aba7c12fec38bb3867ae">More...</a><br/></td></tr>
<tr class="separator:ga50bd2fa853d6aba7c12fec38bb3867ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43e275e75f776f74a124968aa83d29a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xocp__client__apis.html#ga43e275e75f776f74a124968aa83d29a2">XOcp_ClientAttestWithKeyWrapDevAk</a> (XOcp_ClientInstance *InstancePtr, u64 AttnPloadAddr, u32 AttnPloadSize, u32 PubKeyOffset, u64 SignatureAddr)</td></tr>
<tr class="memdesc:ga43e275e75f776f74a124968aa83d29a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to calculate the hash of the Key Wrap buffer and attest with Key Wrap DevAk private key.  <a href="#ga43e275e75f776f74a124968aa83d29a2">More...</a><br/></td></tr>
<tr class="separator:ga43e275e75f776f74a124968aa83d29a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga0c6bb44603339209f55de3ef94141395"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_ClientAttestWithDevAk </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>AttestWithDevAk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get 509 certificate. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">AttestWithDevAk</td><td>- Address of XOcp_AttestWithDevAk structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a82068a5409464a0f6dc3dcc23037d747">XOCP_API_ATTESTWITHDEVAK</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="ga43e275e75f776f74a124968aa83d29a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_ClientAttestWithKeyWrapDevAk </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>AttnPloadAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>AttnPloadSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PubKeyOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>SignatureAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to calculate the hash of the Key Wrap buffer and attest with Key Wrap DevAk private key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">AttnPloadAddr</td><td>- Address of the buffer which should be attested </td></tr>
    <tr><td class="paramname">AttnPloadSize</td><td>- Size of buffer in bytes </td></tr>
    <tr><td class="paramname">PubKeyOffset</td><td>- Offset in provided buffer where public key needs to be stored </td></tr>
    <tr><td class="paramname">SignatureAddr</td><td>- Address of the signature after attestation</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - Successfully hashed and attested the data with Key Wrap DevAk private key</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ga4870addc7ba09c6a7cfdbb443f3e340d">XOCP_ADDR_HIGH_SHIFT</a>, <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a3ee212594f10d93c996947ac021ac2ef">XOCP_API_ATTEST_WITH_KEYWRAP_DEVAK</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="gaa164a8fafefc1e2b183db27281ee1b13"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_ClientInit </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *const&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMailbox *const&#160;</td>
          <td class="paramname"><em>MailboxPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the instance of mailbox. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">MailboxPtr</td><td>- Pointer to the mailbox instance</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - On successful initialization</li>
<li>XST_FAILURE - On failure </li>
</ul>
</dd></dl>
<p>Uses XMailbox instance to initiate the communication between client and server.</p>

<p>Referenced by <a class="el" href="group__xocp__dev_keyexample__apis.html#ga840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="gabe2000beca7269b9e9f1ba0434adfbb7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_ExtendHwPcr </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xil__ocpapis.html#ga6d4b0b867435b21d30213387044b633c">XOcp_HwPcr</a>&#160;</td>
          <td class="paramname"><em>PcrNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>ExtHashAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to extend the PCR with provided hash by requesting ROM service. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">PcrNum</td><td>- Variable of XOcp_HwPcr enum to select the PCR to be extended </td></tr>
    <tr><td class="paramname">ExtHashAddr</td><td>- Address of the buffer which holds the hash to be extended </td></tr>
    <tr><td class="paramname">Size</td><td>- Size of extended hash</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR extend is success</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a0ea33ccca2247ae86b23182b1d691e25">XOCP_API_EXTEND_HWPCR</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="gab8fbe7fbfcb136e816374b295b769972"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_ExtendSwPcr </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XOcp_SwPcrExtendParams *&#160;</td>
          <td class="paramname"><em>ExtendParams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to extend the SW PCR with provided hash/data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">ExtendParams</td><td>- Pointer to the XOcp_SwPcrExtendParams structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR extend is success</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a802d68e4fc35a8bb08e4e79fd2a5aa48">XOCP_API_EXTEND_SWPCR</a>, <a class="el" href="group__xocp__api__ids.html#ga7365d3fa2793edeb5a50ca16d130f019">XOCP_EXTENDED_HASH_SIZE_IN_BYTES</a>, <a class="el" href="group__xil__ocpapis.html#ggaa2429504100aa2ea3c8f7a11bdd6c503a3967f4a82634e5681edc9e07993343a4">XOCP_PCR_ERR_DATA_IN_INVALID_MEM</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="gaebd4df862308eaeebbfb06a456a19f9f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GenDmeResp </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>NonceAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>DmeStructResAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to fill the DME structure and generates the response with signature. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">NonceAddr</td><td>- pointer to 48 bytes buffer which holds the Nonce, which shall be used to fill one of the member of DME sturcture </td></tr>
    <tr><td class="paramname">DmeStructResAddr</td><td>- pointer to 224 bytes buffer, which is used to store the response DME structure of type XOcp_DmeResponseStructure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - Upon success</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667ac30d0d7181e066b8a984ede325504cf8">XOCP_API_GENDMERESP</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

<p>Referenced by <a class="el" href="group__xocp__example__apis.html#ga840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="ga50bd2fa853d6aba7c12fec38bb3867ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GenSharedSecretWithDevAk </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u8 *&#160;</td>
          <td class="paramname"><em>PubKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>SharedSecret</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to generate shared secret using Elliptic Curve Diffie–Hellman Key Exchange (ECDH). </p>
<p>The private key used to generate the shared secret is internal DevAK private key which is determined by the subsystem from where the command is originating.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the client instance </td></tr>
    <tr><td class="paramname">PubKey</td><td>Pointer to the buffer which contains the public key to be used for calculating shared secret using ECDH. </td></tr>
    <tr><td class="paramname">SharedSecret</td><td>Pointer to the output buffer which shall be used to store shared secret</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On Success</li>
<li>Errorcode On failure </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xocp__api__ids.html#ga4870addc7ba09c6a7cfdbb443f3e340d">XOCP_ADDR_HIGH_SHIFT</a>, <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a159154b25019671afd2acc943f5ee6e2">XOCP_API_GEN_SHARED_SECRET</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="ga729ea6a53f3410b330a4eb6635074c88"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GetHwPcr </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PcrMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>PcrBufAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PcrBufSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get the PCR value from requested PCR. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">PcrMask</td><td>- Mask that tells which PCR to be read based on the bits set (bit 0 corresponds to PCR 0)and how many PCRs to be read using the number of bits set. </td></tr>
    <tr><td class="paramname">PcrBufAddr</td><td>- Address of the buffer to store the requested PCR contents </td></tr>
    <tr><td class="paramname">PcrBufSize</td><td>- Buffer size to read the PCR values</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a0165a00496c3a9724f9e97be4262fef6">XOCP_API_GET_HWPCR</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="ga36f63a2e8165e1f3360f8e2858d7aa53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GetHwPcrLog </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>HwPcrEventAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>HwPcrLogInfoAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>NumOfLogEntries</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get the log and status of HWPCR. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">HwPcrEventAddr</td><td>- Pointer to the XOcp_HwPcrEvent structure </td></tr>
    <tr><td class="paramname">HwPcrLogInfoAddr</td><td>- Pointer to the XOcp_HwPcrLogInfo structure </td></tr>
    <tr><td class="paramname">NumOfLogEntries</td><td>- Number of log entries to read</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a04912d871713dcd3b61d694f429bc095">XOCP_API_GET_HWPCRLOG</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="gaaca4f4567e961877901f3ed298ed01e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GetSwPcr </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PcrMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>PcrBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PcrBufSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get the SW PCR value from requested PCR. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">PcrMask</td><td>- Mask that tells which PCR to be read based on the bits set (bit 0 corresponds to PCR 0)and how many PCRs to be read using the number of bits set. </td></tr>
    <tr><td class="paramname">PcrBuf</td><td>- Pointer to the PCR buffer to store the requested PCR contents </td></tr>
    <tr><td class="paramname">PcrBufSize</td><td>- Buffer size to read the PCR values</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a0d48b20c276c35c9e253b2756aa9f1ac">XOCP_API_GET_SWPCR</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="gaa9d5159f23ac4215dff07b1a16a0e2e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GetSwPcrData </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XOcp_SwPcrReadData *&#160;</td>
          <td class="paramname"><em>DataParams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get the SW PCR data for the specified PCR. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">DataParams</td><td>- Pointer of the XOcp_SwPcrReadData structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a6ad39f4af276b8893ca0e8975a6f8f6f">XOCP_API_GET_SWPCRDATA</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="ga71a4d8aea262fc732fa812829dd891ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GetSwPcrLog </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XOcp_SwPcrLogReadData *&#160;</td>
          <td class="paramname"><em>LogParams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get the SW PCR log. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">LogParams</td><td>- Pointer to the XOcp_SwPcrLogReadData structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a4e737b47477267f9e7b792a237c388d0">XOCP_API_GET_SWPCRLOG</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
<a class="anchor" id="ga16013e82a245e7dfdd7a3c2e2df476e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XOcp_GetX509Cert </td>
          <td>(</td>
          <td class="paramtype">XOcp_ClientInstance *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>GetX509CertAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends IPI request to get 509 certificate. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the client instance </td></tr>
    <tr><td class="paramname">GetX509CertAddr</td><td>- Address of XOcp_X509Cert structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - If PCR contents are copied</li>
<li>XST_FAILURE - Upon any failure </li>
</ul>
</dd></dl>
<p>Fill IPI Payload </p>

<p>References <a class="el" href="group__xocp__api__ids.html#ggae95d465df2996596afe4dd4e5f669667a27d6f0ea57a51b0b5cb4b61f85c690a8">XOCP_API_GETX509CERT</a>, and <a class="el" href="group__xocp__mailbox__apis.html#ga6bf28d17b9014d88926e36cd519dd804">XOcp_ProcessMailbox()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
